package com.google.code.qsecurity.client;

import javax.validation.Validator;
import javax.validation.groups.Default;

import com.google.code.qsecurity.shared.ClientGroup;
import com.google.code.qsecurity.shared.proxy.EmailVerificationProxy;
import com.google.code.qsecurity.shared.proxy.UserProxy;
import com.google.gwt.core.client.GWT;
import com.google.gwt.validation.client.AbstractGwtValidatorFactory;
import com.google.gwt.validation.client.GwtValidation;
import com.google.gwt.validation.client.impl.AbstractGwtValidator;

public final class QValidatorFactory extends AbstractGwtValidatorFactory {
	
	@GwtValidation(
		value = {
			UserProxy.class,
			EmailVerificationProxy.class},
		groups = {
			Default.class, 
			ClientGroup.class})
	public interface GwtValidator extends Validator {
	}

	@Override
	public AbstractGwtValidator createValidator() {
		return GWT.create(GwtValidator.class);
	}

}
